:root{
    --main-color:#af2a2a;
}
*{
    font-family: 'Roboto', sans-serif;
    margin:0; 
    padding:0;
    box-sizing: border-box;
    outline: none; border:none;
    text-decoration: none;
    text-transform: capitalize;
    transition: all .2s linear;
    line-height: 1.5;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body{
    background: #f1f1f1;
    padding-left: 30rem;
}
/* 打字个人网站 */
.title{
    font-size: 25px;
    margin-top: -15%;
}
#text 
{
  color :var(--main-color);
  font-size: 30px;
}
/* 导航 */
/* 侧拉 */
header{
    position: fixed;
    top:0; left:0; bottom:0;
    background:#000000d4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    flex-flow: column;
    padding:8rem 2rem;
    width:30rem;
    text-align: center;
}

header .navbar a{
    display: block;
    font-size: 2rem;
    color:#fff;
    margin:2rem 0;
}

header .navbar a:hover{
    letter-spacing: .2rem;
    color:var(--main-color);
}

/* 手机端按钮自适应 */
#menu-bars{
    position: fixed;
    top: 1rem; 
    right: 1rem;
    z-index: 10000;
    background:var(--main-color);
    color:#fff;
    border-radius: 100%;
    padding:2.5rem 2.5rem;
    font-size: 3rem;
    cursor:pointer;
    display: none;
}

section{
    padding:1rem 5%;
    min-height: 100vh;
}
/* 标题 */
.heading{
    font-size: 4rem;
    padding-bottom: 1rem;
    color:#111;
    text-transform: uppercase;
}

.heading span{
    color:var(--main-color);
    text-transform: uppercase;
}
/* 结束 */


/* 首页按钮 */
.btn{
    display: inline-block;
    margin-top: 1rem;
    padding:.8rem 3rem;
    background:var(--main-color);
    color:#fff;
    cursor: pointer;
    font-size: 1.7rem;
}

.btn:hover{
    background:#111;
    letter-spacing: .2rem;
}



/* 首页 */
.home{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap:1.5rem;
}

.home .image{
    flex:1 1 20rem;
}

.home .image img{
    width:100%
}

.home .content{
    flex:1 1 40rem;
}

.home .content .hi{
    font-size: 2rem;
    color:var(--main-color);
}

.home .content h3{
    font-size: 4.5rem;
    color:#111;
    text-transform: uppercase;
}

.home .content h3 span{
    color:var(--main-color);
    text-transform: uppercase;
}

.home .content .info{
    font-size: 2.5rem;
    color:#111;
    padding:.5rem 0;
}

.home .content .text{
    font-size: 1.7rem;
    color:#666;
    padding:.5rem 0;
}

.row-1{
    display: flex;
    flex-wrap: wrap;
    gap:1.5rem;
    padding-bottom: 2rem;
    margin-top: 10%;
}

.row-1 .image{
    flex:1 1 25rem;
}

.row-1 .image img{
    height: 100%;
    width:100%;
    object-fit: cover;
    border:1rem solid #fff;
    border-radius: .5rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
}

.row-1 .content{
    flex:1 1 50rem;
}

.row-1 .content h3{
    color:#333;
    font-size: 3.5rem;
}

.row-1 .content p{
    color:#666;
    font-size: 1.7rem;
    padding:.5rem 0;
}

/* 结束 */


/* 技能 */
.skill .heading{
    margin-top: -5%;
}
.row-2{
    display: flex;
    flex-wrap: wrap;
    gap:1.5rem;
    align-items: center;
}

.row-2 .skills{
    flex:1 1 10rem;
    margin-top: 5%;
}
.skill .heading{
    margin-top: 16%;
}
.row-2 .skills .progress{
    padding:1rem 0;
}

.row-2 .skills .progress h3{
    display: flex;
    justify-content: space-between;
    padding:.2rem 0;
    font-size: 1.7rem;
    color:#111;
    font-weight: 500;
}

.row-2 .skills .progress .bar{
    width:100%;
    background:#ccc;
    overflow:hidden;
    height:1rem;
    border-radius: 50rem;
}

.row-2 .skills .progress .bar span{
    display:block;
    height:100%;
    background:var(--main-color);
    border-radius: 50rem;
}
/* 技能条 */
.skills{
    margin-top: -25%;
}
h1{
    margin-top: 12%;
}
.row-2 .skills .progress:nth-child(1) .bar span{
    width:65%;
}

.row-2 .skills .progress:nth-child(2) .bar span{
    width:70%;
}

.row-2 .skills .progress:nth-child(3) .bar span{
    width:60%;
}

 .row-2 .skills .progress:nth-child(4) .bar span{
    width:60%;
}
.row-2 .skills .progress:nth-child(5) .bar span{
    width:25%;
}
 .row-2 .skills .progress:nth-child(6) .bar span{
    width:55%;
}

/* 结束 */



/* 作品集 */
.works a{
    color: #fff;
    text-decoration: none;
}
.works .heading{
    margin-top: 1%;
}
.works .box-works{
    display: flex;
    flex-wrap: wrap;
    gap:1.5rem;
    margin-top: 1%;
}
.box11{
    width: 300px;
}
.box11 img{
    height: 140px;
    width: 270px;
}
.box11:hover{
    transform: translateY(-5%);
}

.works .box-works .box{
    flex:1 1 10rem;
    text-align: center;
    padding:0.5rem;
    background:#ffffff;
    border-radius: .5rem;
    box-shadow:0 .5rem 1rem rgba(0, 0, 0, 0.1);
    padding: 15px;
}


.works .box-works .box h3{
    color:#444;
    font-size: 2.2rem;
    padding-top: 0.5rem;
}

.works .box-works .box p{
    color:#666;
    font-size: 1.7rem;
    padding-top: 0.5rem;
}
button{
    cursor: pointer;
    border: none;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}
button:hover{
    background-color: #af2a2a;
}






/* 照片 */
.heading{
    margin-top: 5%;
}
.container{
    display: flex;
    justify-content: center;
    align-items: center;
    /* 允许换行 */
    flex-wrap: wrap;
    margin-top: 5%;
}
.card{
    position: relative;
    width: 300px;
    height: 240px;
    margin: 5px;
    display: flex;
    align-items: flex;
    text-align: center;
    color: #f5f5f5;
    /* 阴影 */
    box-shadow: 0 1px 1px rgba(0,0,0,0.1),
    0 2px 2px rgba(0,0,0,0.1),
    0 4px 4px rgba(0,0,0,0.1),
    0 8px 8px rgba(0,0,0,0.1),
    0 16px 16px rgba(0,0,0,0.1);
    /* 溢出隐藏 */
    overflow: hidden;
}
.card::before{
    content: "";
    width: 100%;
    height: 110%;
    position: absolute;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: 0 0;
    transition: transform 4s (0.19,1,0.22,1);
}
/* 设置图片 */
.card:nth-child(1)::before{
    background-image: url(../images/微信图片_20240619185718.jpg);
}
.card:nth-child(2)::before{
    background-image: url(../images/微信图片_20240619185721.jpg);
}
.card:nth-child(3)::before{
    background-image: url(../images/微信图片_20240619185727.jpg);
}
.card:nth-child(4)::before{
    background-image: url(../images/微信图片_20240619185733.jpg);
}
.card:nth-child(5)::before{
    background-image: url(../images/微信图片_20240619185739.jpg);
}
.card:nth-child(6)::before{
    background-image: url(../images/微信图片_20240619185736.jpg);
}
/* 遮罩 */
.card::after{
    content: "";
    display: block;
    width: 100%;
    height: 200%;
    background: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.25) 55%,
    rgba(0,0,0,0.8) 100%);
    /* 绝对定位 */
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(0);
    /* 过渡效果 */
    transition: transform 4s (0.19,1,0.22,1);
}
.card .content{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 16px 8px;
    transform: translateY(76%);
    transition: transform 4s (0.19,1,0.22,1);
}
.card h2{
    font-size: 23px;
    font-weight: bold;
}
.card p{
    font-size: 15px;
    /* 字间距 */
    letter-spacing: 2px;
    width: 80%;
    line-height: 30px;
    margin-top: 25px;
    /* 文本两端对齐 */
    text-align: justify;
}
.card .content *:not(h2){
    opacity: 0;
    transform: translateY(20px);
    transition: transform 4s (0.19,1,0.22,1);;
}
.card:hover{
    align-items: center;
}
.card:hover::before{
    transform: translateY(-5%);
}
.card:hover::after{
    transform: translateY(-50%);
}
.card:hover .content{
    transform: translateY(0);
}
.card:hover .content *:not(h2){
    opacity: 1;
    transform: translateY(0);
    /* 过渡效果延迟 */
}
/* 结束 */

/* 联系我 */
.contact .icons-container{
    display: flex;
    gap:1.5rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
}

.contact .icons-container .icons{
    flex:1 1 25rem;
    text-align: center;
    padding:2rem;
    background:#fff;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
    border-radius: .5rem;
}
.contact .icons-container .icons h3{
    color:#606060;
    font-size: 2rem;
    padding:.5rem 0;
    padding-top: 1rem;
}

.contact .icons-container .icons p{
    color:#666;
    font-size: 1.7rem;
}

.contact .row form{
    flex:1 1 55rem;
    background:#fff;
    padding:0 2rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
    border-radius: .5rem;
}


.contact .row form .box,
.contact .row form textarea{
    width: 100%;
    border-bottom: .1rem solid #333;
    color:#333;
    text-transform: none;
    font-size: 1.7rem;
    padding:1rem 0;
    margin:1rem 0;
}

.contact .row form textarea{
    height: 20rem;
    resize: none;
}

.contact .row form .btn{
    margin-top: 0;
    margin-bottom: 1.5rem;
}
/* 结束 */

/* 尾页 */
.footer{
    margin-top: 2rem;
    font-size: 2rem;
    padding:2.5rem;
    text-align: center;
    color:#666;
    background: #fff;
}

.footer span{
    color:var(--main-color);
}
/* 结束 */


















/* media queries  */
@media (max-width:991px){

    html{
        font-size: 55%;
    }
    
    body{
        padding: 0;
    }

    #menu-bars{
        display: initial;
    }

    header{
        left: -100%;
    }
    .home img{
        height: 450px;
        width: 250px;
        margin-top: -35%;
    }

    header.active{
        left:0%;
    }
    .skill h1{
        margin-top: 3%;
    }
    .skills{
        margin-top: -120%;
    }
    .works{
    margin-top: -90%;
    }
    .picture{
    margin-top: 12%;
    }
    .contact{
    margin-top: 12%;
    }
    .heading{
        margin-top: -15%;
    }


}

@media (max-width:450px){

    html{
        font-size: 50%;
    }

    header{
        width:100%;
    }


}